{template common/contentheader}
<div class="setcontent">
	<div class="settitle">
		<h3>{lang admin_user_storecategory:admin}</h3>
	</div>
	<div class="alert alert-info mt10">
		<span class="label label-info">{lang info:admin}</span>
		{lang admin_user_storecategory_tip:admin}
	</div>
	<div class="setform">
		<table class="table table-striped">
        <thead>
          <tr>
            <th width="30">ID</th>
            <th width="50">{lang th_displayorder:admin}</th>
            <th width="80">{lang category_name:admin}</th>
            <th width="80">{lang reltopics:admin}</th>
            <th width="80">{lang operation:admin}</th>
          </tr> 
        </thead>
        <tbody>
        {loop $categories $key $sm} 
			<tr>  
			<td>$sm['category_id']</td>
			<td>$sm['display_order']</td>
			<td>$sm['category_name']</td>
			<td>$sm['topics']</td>
			<td>{if $sm['category_id']=='1'}{lang default:admin}{else}<a href="{url admin/storecategory?act=delete&catid=$sm['category_id']}">{lang delete:admin}{/if}</a> 
			<a href="{url admin/storecategory?act=edit&catid=$sm['category_id']}">{lang edit:admin}</a></td>
          	</tr>
		{/loop}
          
        </tbody>
		</table>
		<div class="text_c">$pages</div>
	</div>
	<div class="settitle">
		<h3>{lang add_category:admin}</h3>
	</div>
	<div class="setform">
		<form class="pzform" method="post" action="{url admin/storecategory?act=add}" id="addform">
			
			<div class="formgroup">
				<label class="formlabel">{lang category_name:admin}:</label>
				<div class="formcontrol">
					<input type="text" name="category_name" id="category_name"/>
				</div>
				<span class="formhelp">{lang category_name:admin}</span>
			</div>
			<div class="formgroup">
				<label class="formlabel">{lang reltopics:admin}:</label>
				<div class="formcontrol">
					<input type="text" name="topics" id="topics"/>
				</div>
				<span class="formhelp">{lang reltopics_tip:admin}</span>
			</div>
			<div class="formgroup">
				<label class="formlabel">{lang th_displayorder:admin}:</label>
				<div class="formcontrol">
					<input type="text" name="display_order" id="display_order"/>
				</div>
				<span class="formhelp">{lang th_displayorder:admin}</span>
			</div>
			
			<div class="formbuttons">
				<button type="submit" class="btn btn-primary">{lang add:admin}</button>
			</div>
		</form>
	</div>
</div>
{template common/contentfooter}